From: Florian Müllner Date: Sun, 29 Jul 2012 10:06:17 +0000 (+0200) Subject: workspacesView: Avoid an unnecessary animation X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6073 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e92a6b3c6cd7bec438cb7fc87426208d3dd5cb45;p=gnome-shell.git workspacesView: Avoid an unnecessary animation Currently we animate scrolling to the active workspace both when the number of workspaces changed and after changing the active workspace. So in case we don't actually change workspace, this results in an unnecessary animation that may even have unwanted side effects: when done during the overview transition (e.g. in the case of opening and activating a window on an empty workspace), non-active workspaces become visible during the transition. To fix, don't scroll to the active workspace when the number of workspaces changes and rely on the 'switch-workspace' signal being emitted as necessary. https://bugzilla.gnome.org/show_bug.cgi?id=682002 --- diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index f769186fb..2b5eac5bc 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -317,8 +317,6 @@ const WorkspacesView = new Lang.Class({ this._updateWorkspaceActors(false); } - - this._scrollToActive(true); }, _activeWorkspaceChanged: function(wm, from, to, direction) {